home *** CD-ROM | disk | FTP | other *** search
/ Nikon Picture Project 1.7 / Nikon PictureProject - Disc 1.iso / mac / Welcome.app / Contents / Resources / OpenPackage.command < prev    next >
Encoding:
Text File  |  2005-12-13  |  612 b   |  24 lines

  1. #!/bin/sh
  2.  
  3. #################### Check self arguments.
  4. if test $# -lt 1
  5. then
  6.     echo 'No, Too few arguments.' > /dev/console
  7.     exit 0
  8. fi
  9.  
  10. #################### If installer command doesn't exist, Open with Installer.app.
  11. if test ! -e "/usr/sbin/installer"
  12. then
  13.     echo 'tell application "Installer" to activate' | /usr/bin/osascript &
  14.     /Applications/Utilities/Installer.app/Contents/MacOS/Installer "${1}"
  15.     echo "" > /dev/null
  16.     exit 0
  17. fi
  18.  
  19. #################### Install with installer command.
  20. /usr/sbin/installer -verboseR -pkg "${1}" -target /
  21. #/usr/sbin/installer -verboseR -pkg "${1}" -target / > /dev/stdout
  22.  
  23. exit 0
  24.